/*
 * manejoFAT.h
 *
 *  Created on: 06/11/2011
 *      Author: utn_so
 */

#ifndef MANEJOFAT_H_
#define MANEJOFAT_H_

/***************************************************************************/
/****************************** INCLUDES ***********************************/
/***************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <malloc.h>
#include <string.h>
#include <limits.h>
#include <ctype.h>

#include "fuseDef.h"
#include "utils.h"


/***************************************************************************/
/****************************** DEFINES ************************************/
/***************************************************************************/


/***************************************************************************/
/******************************** STRUCS  **********************************/
/***************************************************************************/


/***************************************************************************/
/****************************** FUNCIONES  *********************************/
/***************************************************************************/

int32_t bufferPrincipalBootFats(struct bootSector* bootSector, unsigned char* fatVolumeRegion);
uint32_t thisFATSecNum(struct bootSector*, uint32_t);
uint32_t thisFATSecNumOffset(struct bootSector*, uint32_t );
int32_t leerEntradaFAT(struct bootSector*, uint32_t);
int32_t cambiarEntradaFAT(struct bootSector*, uint32_t, uint32_t);
int32_t esClusterLibre(struct bootSector*, uint32_t);
int32_t dameClusterLibre(struct bootSector*);
uint32_t mostrarEntradasFat(struct bootSector*);
uint32_t cantidadClustersLibres(struct bootSector*);
uint32_t traerElEOC(struct bootSector*, unsigned char*);
int32_t verificarUltimoClusterCadena(struct bootSector*, uint32_t);
int32_t ponerHexaEnBuffer(uint32_t valor, unsigned char* buffer);

#endif /* MANEJOFAT_H_ */
